package com.kzw.core.util;

import java.util.Timer;
import java.util.TimerTask;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

//@WebListener
public class CertUtil2 implements ServletContextListener {

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		// 每天检查license是否过期
		try {
			new Timer().scheduleAtFixedRate(new TimerTask() {
				public void run() {
					//LicenseUtil.validate();
				}
			}, 100000, 1000 * 3600 * 24);
		} catch (Exception e) {
			
		}
	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		
	}

}
